
/*
 * The Real SoundTracker - automatically scalable widget containing
 * an image (header)
 *
 * Copyright (C) 2002 Yury Aliaev <mutabor@catholic.org>
 * Copyright (C) 1998-2002 Michael Krause
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

#ifndef __SCALABLE_PIC_H
#define __SCALABLE_PIC_H

#include <gtk/gtk.h>
#include <gtk/gtkwidget.h>
#include <gdk-pixbuf/gdk-pixbuf.h>

G_BEGIN_DECLS

#define SCALABLE_PIC_TYPE			(scalable_pic_get_type())
#define SCALABLE_PIC(obj) 			(G_TYPE_CHECK_INSTANCE_CAST((obj), SCALABLE_PIC_TYPE, ScalablePic))
#define SCALABLE_PIC_CLASS(klass) 	(G_TYPE_CHECK_CLASS_CAST((klass), SCALABLE_PIC_TYPE, ScalablePicClass))
#define IS_SCALABLE_PIC(obj)		(G_TYPE_CHECK_INSTANCE_TYPE ((obj), SCALABLE_PIC_TYPE))
#define IS_SCALABLE_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE((klass), SCALABLE_PIC_TYPE))

typedef struct _ScalablePic {
	GtkWidget widget;
	GdkPixbuf *pic, *copy;
	gint maxwidth, maxheight, former_width, former_height, pic_width, pic_height;
} ScalablePic;

typedef struct _ScalablePicClass {
	GtkWidgetClass parent_class;
} ScalablePicClass;

/* create a widget containing GdkPixbuf image */
GtkWidget *scalable_pic_new (GdkPixbuf *pic);
GType scalable_pic_get_type (void);

G_END_DECLS

#endif /* __SCALABLE_PIC_H */
